-
Notifications
You must be signed in to change notification settings - Fork 4.2k
update pipelining tutorial #3182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3182
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit eca31e2 with merge base 7038ce7 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Minor editorial nits
x = x.to(device) | ||
y = y.to(device) | ||
|
||
def tokenwise_loss_fn(outputs, targets): | ||
loss_fn = nn.CrossEntropyLoss() | ||
outputs = outputs.view(-1, model_args.vocab_size) | ||
targets = targets.view(-1) | ||
outputs = outputs.reshape(-1, model_args.vocab_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes weren't necessary but I do think they are clearer
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Update the tutorial to work with latest API changes